/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.support.d;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.view.View;

public class a {
    private static Context a;
    private static a b = null;

    public static a a(Context paramContext) {
        if (paramContext == null)
            return null;
        if (b == null) {
            b = new a();
            a = paramContext.getApplicationContext();
        }
        return b;
    }

    public void a(View paramView, int paramInt) {
        try {
            a(paramView, a(paramInt));
        } catch (Exception localException) {
            com.qihoo.gamecenter.sdk.support.g.a.c("LoadResource", new Object[] { localException.toString() });
        }
    }

    public Drawable a(int paramInt) {
        if (paramInt == 0)
            return null;
        return com.qihoo.gamecenter.sdk.common.b.a.a(a, "360sdk_res/res5.dat", paramInt);
    }

    public void a(View paramView, int paramInt1, int paramInt2, int paramInt3) {
        try {
            Drawable localDrawable1 = a(paramInt1);
            Drawable localDrawable2 = a(paramInt2);
            Drawable localDrawable3 = a(paramInt3);
            StateListDrawable localStateListDrawable = new StateListDrawable();
            localStateListDrawable.addState(new int[] { 16842919, 16842910 }, localDrawable2);
            localStateListDrawable.addState(new int[] { 16842910, 16842908 }, localDrawable2);
            localStateListDrawable.addState(new int[] { 16842910 }, localDrawable1);
            localStateListDrawable.addState(new int[] { 16842908 }, localDrawable2);
            localStateListDrawable.addState(new int[0], localDrawable3);
            a(paramView, localStateListDrawable);
        } catch (Exception localException) {
            com.qihoo.gamecenter.sdk.support.g.a.c("LoadResource", new Object[] { localException.toString() });
        }
    }

    public void a(View paramView, Drawable paramDrawable1, Drawable paramDrawable2, Drawable paramDrawable3) {
        try {
            StateListDrawable localStateListDrawable = new StateListDrawable();
            localStateListDrawable.addState(new int[] { 16842919, 16842910 }, paramDrawable2);
            localStateListDrawable.addState(new int[] { 16842910, 16842908 }, paramDrawable2);
            localStateListDrawable.addState(new int[] { 16842910 }, paramDrawable1);
            localStateListDrawable.addState(new int[] { 16842908 }, paramDrawable2);
            localStateListDrawable.addState(new int[0], paramDrawable3);
            a(paramView, localStateListDrawable);
        } catch (Exception localException) {
            com.qihoo.gamecenter.sdk.support.g.a.c("LoadResource", new Object[] { localException.toString() });
        }
    }

    public void a(View paramView, Drawable paramDrawable) {
        paramView.setBackgroundDrawable(paramDrawable);
    }
}